﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EraNet.Core.Model.Enum;
using EraNet.Core.Model.SysManage;
using System.Linq.Expressions;

namespace EraNet.Services.SysManage
{
    public interface ISysConfigService
    {
        /// <summary>
        /// 根据数据ID获取配置信息
        /// </summary>
        /// <param name="CfgId"></param>
        /// <returns></returns>
        SysConfigs GetConfigById(int CfgId);
        /// <summary>
        /// 插入配置信息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        int InsertConfig(SysConfigs model);
        /// <summary>
        /// 根据类型值，获取配置信息
        /// </summary>
        /// <param name="DicType">配置值</param>
        /// <returns></returns>
        SysConfigs GetConfigByKey(string CfgKeys, ConfigFor ty);

        /// <summary>
        /// 根据where条件获取实体
        /// </summary>
        /// <param name="whereLambda">where条件</param>
        /// <returns></returns>
        SysConfigs GetEntityByFunc(Expression<Func<SysConfigs, bool>> whereLambda);
        SysConfigs GetConfigByKey(string CfgKeys);

        /// <summary>
        /// 修改实体
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        int Update(SysConfigs entity);
    }
}
